package cn.gson.work.model.pojos;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

@Entity
public class Resourcetype {
    private long typeId;
    private String typeName;
    private String typeRemark;
    private Date typeTime;
    private long userNo;
    private User user;

    @Basic
    @Column(name = "user_no")
    public long getUserNo() {
        return userNo;
    }

    public void setUserNo(long userNo) {
        this.userNo = userNo;
    }

    @ManyToOne
    @JoinColumn(name = "user_no",insertable = false,updatable = false)
    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @Id
    @Column(name = "TYPE_ID")
    public long getTypeId() {
        return typeId;
    }

    public void setTypeId(long typeId) {
        this.typeId = typeId;
    }

    @Basic
    @Column(name = "TYPE_TIME")
    public Date getTypeTime() {
        return typeTime;
    }

    public void setTypeTime(Date typeTime) {
        this.typeTime = typeTime;
    }

    @Basic
    @Column(name = "TYPE_NAME")
    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    @Basic
    @Column(name = "TYPE_REMARK")
    public String getTypeRemark() {
        return typeRemark;
    }

    public void setTypeRemark(String typeRemark) {
        this.typeRemark = typeRemark;
    }

    @Override
    public String toString() {
        return "Resourcetype{" +
                "typeId=" + typeId +
                ", typeName='" + typeName + '\'' +
                ", typeRemark='" + typeRemark + '\'' +
                ", typeTime=" + typeTime +
                ", userNo=" + userNo +
                ", user=" + user +
                '}';
    }
}
